//
//  FZPublic.m
//  CasesOfEntry
//
//  Created by 聚财通 on 16/4/8.
//  Copyright © 2016年 付正. All rights reserved.
//

#import "FZPublic.h"

@implementation FZPublic

#pragma mark --- 判断电话号码
+(BOOL)judgeTheTelephone:(NSString *)phone
{
    //判断电话号码
    NSString *biaod = @"^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0-9])\\d{8}$";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",biaod];
    if (phone.length != 0) {
        if ([predicate evaluateWithObject:phone]) {
            return YES;
        }
        else{
            return NO;
        }
    }else{
        return NO;
    }
}

#pragma mark --- 获取系统时间字符串
+ (NSString *)getSystemTime
{
    NSDate *  senddate=[NSDate date];
    NSDateFormatter  *dateformatter=[[NSDateFormatter alloc] init];
    [dateformatter setDateFormat:@"YYYYMMddHHmmss"];
    NSString *  morelocationString=[dateformatter stringFromDate:senddate];
    
    return morelocationString;
}

@end
